function ret=init_matrixpoint_list(l)
 H=convertToSu2(1/sqrt(2)*[1 1;1 -1]);
 T=[exp(-1i*pi/8) 0;0 exp(1i*pi/8)];
 global list;
 list={};
 stk=init_stack(l); 
 G={H,T,T'};
 generate(stk,l,G);
 ret=list;
endfunction

function generate(stk,l,G)
 if(l==0)
  printInfo(stk,G);
  return;
 endif 
 for i=1:length(G)
  [r,stk]=push_stack(stk,G{i});
  if(r==0)
   continue;
  endif
  generate(stk,l-1,G);
  [r,stk]=pop_stack(stk);
 endfor
endfunction

function printInfo(stk,G)

 global list;
 cell=stk.stack;
 view="";
 for k =1:length(stk.stack)
   if(cell{k}==G{1})
    view=strcat(view,"H");
   endif
   if(cell{k}==G{2})
    view=strcat(view,"T");
   endif
   if(cell{k}==G{3})
    view=strcat(view,"T'");
   endif
 endfor 
 p=init_matrixpoint(stk.mat,view);
 list{end+1}=p;
endfunction
